{{- if or .Site.Params.algolia .Site.Params.docsearch }}
  {{- $indexURL := "" }}
  {{- if .Site.Params.algolia }}
      {{- $tmpl := resources.Get "algolia/index.json" }}
      {{- $index := $tmpl | resources.ExecuteAsTemplate "algolia/index.json" . }}
      {{- $indexURL = $index.RelPermalink }}
  {{- end -}}
  <hr class="vr d-none d-xxl-block ms-xxl-1">
  <div class="search-button d-flex align-items-center ms-0 ms-xxl-2 p-0" data-search-index="{{ $indexURL }}"></div>
{{- end -}}
